
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		<title>Name.Sivory.Castle.Core.Config | Castle API</title>

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<meta name="mobileoptimized" content="0" />
	
		<link rel="stylesheet" href="../css/all.css" media="all" />
		<link rel="stylesheet" href="../css/handheld.css" media="only screen and (max-width: 660px)" />
		<link rel="stylesheet" href="../css/handheld.css" media="handheld" />
		<link rel="stylesheet" href="../css/screen.css" media="screen and (min-width: 661px)" />

		<script src="../javascript/all.js"></script>
		<!--[if lt IE 9]>
			<script src="../javascript/html5.js"></script>
		<![endif]-->
	</head>

	<body>

<div class="index">
	<div class="menu">
		<div class="indexLinks">
			<a href="../index.html">Classes</a>
			<a href="../files.html">Files</a>
		</div>
	
		<h2 class="heading1">Classes</h2>
		
		<input type="text" name="classFilter" class="classFilter" id="ClassFilter" placeholder="Filter"></input>
		
		<nav>
			<ul class="classList" id="ClassList">
				
					<li><a href="../symbols/Name.html">Name</a></li>
				
					<li><a href="../symbols/Name.Sivory.html">Name<span class='break'> </span>.<span class='break'> </span>Sivory</a></li>
				
					<li><a href="../symbols/Name.Sivory.Castle.html">Name<span class='break'> </span>.<span class='break'> </span>Sivory<span class='break'> </span>.<span class='break'> </span>Castle</a></li>
				
					<li><a href="../symbols/Name.Sivory.Castle.Core.html">Name<span class='break'> </span>.<span class='break'> </span>Sivory<span class='break'> </span>.<span class='break'> </span>Castle<span class='break'> </span>.<span class='break'> </span>Core</a></li>
				
					<li><a href="../symbols/Name.Sivory.Castle.Core.Config.html">Name<span class='break'> </span>.<span class='break'> </span>Sivory<span class='break'> </span>.<span class='break'> </span>Castle<span class='break'> </span>.<span class='break'> </span>Core<span class='break'> </span>.<span class='break'> </span>Config</a></li>
				
					<li><a href="../symbols/Name.Sivory.Castle.Editor.html">Name<span class='break'> </span>.<span class='break'> </span>Sivory<span class='break'> </span>.<span class='break'> </span>Castle<span class='break'> </span>.<span class='break'> </span>Editor</a></li>
				
					<li><a href="../symbols/Name.Sivory.Castle.Util.html">Name<span class='break'> </span>.<span class='break'> </span>Sivory<span class='break'> </span>.<span class='break'> </span>Castle<span class='break'> </span>.<span class='break'> </span>Util</a></li>
				
					<li><a href="../symbols/Name.Sivory.Opensea.Game.html">Name<span class='break'> </span>.<span class='break'> </span>Sivory<span class='break'> </span>.<span class='break'> </span>Opensea<span class='break'> </span>.<span class='break'> </span>Game</a></li>
				
			</ul>
		</nav>
	</div>
	<div class="fineprint" style="clear:both">
		<footer>
			
			Documentation generator: <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0<br />
			Template: <a href="http://www.thebrightlines.com/2010/05/06/new-template-for-jsdoctoolkit-codeview/" target="_blank">Codeview</a> 1.2<br />
			Generated on:
			<time datetime='2012-11-31' pubdate>2012-11-31 14:18</time>
		</footer>
	</div>
</div>

<div class="index indexStatic"></div>

<div class="content">
	<div class="innerContent">
		<article>
			<header>
				<h1 class="classTitle">
					
					Class <span>Name.Sivory.Castle.Core.Config</span>
				</h1>
				
				<div class="intro">
					<p class="description summary">
						Castle游戏运行配置参数类。主要功能是向游戏内核提供基本配置参数。由用户建立后传入Game类的构造函数，Game类构造函数可接受匿名创建的Config实例。
					</p>
						
					
						<ul class="summary">
							
								<li>Version 0</li>
							
							
							
								<li>Defined in: <a href="../symbols/src/src_Config.class.js.html">Config.class.js</a></li>
							
							
						</ul>
					
				</div>
			</header>
			
			
				<section>
					<div class="props">
						<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class Name.Sivory.Castle.Core.Config.">
							<caption class="sectionTitle">Class Summary</caption>
							<thead>
								<tr>
									<th scope="col">Constructor Attributes</th>
									<th scope="col">Constructor Name and Description</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription" >
										<div class="fixedFont">
											<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#constructor">Name.Sivory.Castle.Core.Config</a></b>()
										</div>
										<div class="description"></div>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</section>
			
			
			
				
				<section>
					
						<nav>
							<div class="props">
								<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class Name.Sivory.Castle.Core.Config.">
									<caption class="sectionTitle">Field Summary</caption>
									
									<thead>
										<tr>
											<th scope="col">Field Attributes</th>
											<th scope="col">Field Name and Description</th>
										</tr>
									</thead>
									
									<tbody>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#debug">debug</a></b>
													</div>
													<div class="description">游戏调试模式开关。开启调试模式时，会在界面显示游戏数据。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#entryInterface">entryInterface</a></b>
													</div>
													<div class="description">游戏入口界面id，可以是menu类资源id或是scene类资源id，此id须在XML文档中定义。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#entryInterfaceType">entryInterfaceType</a></b>
													</div>
													<div class="description">游戏入口界面的类型，目前可选menu、scene或是battle。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#fps">fps</a></b>
													</div>
													<div class="description">游戏运行时的帧率，单位为frame/s</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#gameContainer">gameContainer</a></b>
													</div>
													<div class="description">游戏容器的id，推荐使用div元素。Castle将在此元素中新建一个canvas元素。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#gameKey">gameKey</a></b>
													</div>
													<div class="description">游戏标识。用于游戏本地存储时区分不同游戏。原则上，一个游戏对应一个固定的游戏标识。取值为任意字符串。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#height">height</a></b>
													</div>
													<div class="description">游戏画布高度。单位为像素。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#keyDelay">keyDelay</a></b>
													</div>
													<div class="description">键盘按键延时。当玩家按住某个键不动时，将以此时间为间隔周期地触发按键事件。单位为毫秒。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#mustLoad">mustLoad</a></b>
													</div>
													<div class="description">游戏全局资源，即需要被优先加载的资源。格式参考默认值。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#resource">resource</a></b>
													</div>
													<div class="description">游戏的资源文件路径。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#resourceType">resourceType</a></b>
													</div>
													<div class="description">游戏资源的类型，可选为“xml”与“json”。当选择“xml”时，则要求资源返回数据必须是纯XML文本，当选择“json”时，则要求资源返回数据必须是{status:.</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#squareheight">squareheight</a></b>
													</div>
													<div class="description">游戏单元格高度。单位为像素。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#squarewidth">squarewidth</a></b>
													</div>
													<div class="description">游戏单元格宽度。单位为像素。</div>
												</td>
											</tr>
										
											<tr>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont">
													<b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#width">width</a></b>
													</div>
													<div class="description">游戏画布宽度。单位为像素。</div>
												</td>
											</tr>
										
									</tbody>
								</table>
							</div>
						</nav>
					
					
					
				</section>
			
	<!--
	#### METHODS SUMMARY
	-->
			
				<section>
					
					
					<div class="props">
						<h2 class="sectionTitle">Method Summary</h2>
						
						
							<nav>
								<table class="summaryTable" id="MethodsList" cellspacing="0" summary="A summary of the methods documented in the class Name.Sivory.Castle.Core.Config.">
									<thead>
										<tr>
											<th scope="col">Method Attributes</th>
											<th scope="col">Method Name and Description</th>
										</tr>
									</thead>
									
									<tbody>
										
										
											<tr
												 class='item0'
											>
												<td class="attributes">&nbsp;</td>
												<td class="nameDescription">
													<div class="fixedFont"><b><a href="../symbols/Name.Sivory.Castle.Core.Config.html#combine">combine</a></b>(config)
													</div>
													<div class="description">将另一个配置对象并入当前实例。</div>
												</td>
											</tr>
										
									</tbody>
								</table>
							</nav>
						
					
						
					</div>
				</section>
			
			
	<!--
	#### EVENTS SUMMARY
	-->
			
	<!--
	#### CONSTRUCTOR DETAILS
	-->
			
				<section>
					<div class="details props">
						<div class="innerProps">
							<h2 class="sectionTitle" id="constructor">
								Class Detail
							</h2>
							
							<div class="fixedFont">
								<b>Name.Sivory.Castle.Core.Config</b>()
							</div>
							
							<div class="description">
								
								<br /><i>Author: </i><a href="http://sivory.my.phpcloud.com">Sivory</a>.
							</div>
							
							
								
									<pre class="code">new Name.Sivory.Castle.Core.Game({gameKey:"003332",width:800,height:600});</pre>
								
							
						
							
							
							
								<dl class="detailList nomargin">
									
									
									
									
									
									
									
									
									
									
									
										<dt class="heading">See:</dt>
										
											<dd>Name.Sivory.Castle.Core.Game</dd>
										
									
								</dl>
							
						</div>
					</div>
				</section>
			
	<!--
	#### FIELD DETAILS
	-->
			
				<section>
					<div class="details props">
						<div class="innerProps">
							<h2 class="sectionTitle">
								Field Detail
							</h2>
							
							
								<div class="fixedFont heading" id="debug">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Boolean}</span>
									
									<b>debug</b>							
								</div>
								
								<div class="description">
									游戏调试模式开关。开启调试模式时，会在界面显示游戏数据。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												false
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="entryInterface">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{String}</span>
									
									<b>entryInterface</b>							
								</div>
								
								<div class="description">
									游戏入口界面id，可以是menu类资源id或是scene类资源id，此id须在XML文档中定义。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												"mainMenu"
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="entryInterfaceType">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{String}</span>
									
									<b>entryInterfaceType</b>							
								</div>
								
								<div class="description">
									游戏入口界面的类型，目前可选menu、scene或是battle。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												"menu"
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="fps">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Number}</span>
									
									<b>fps</b>							
								</div>
								
								<div class="description">
									游戏运行时的帧率，单位为frame/s
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												60
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="gameContainer">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{String}</span>
									
									<b>gameContainer</b>							
								</div>
								
								<div class="description">
									游戏容器的id，推荐使用div元素。Castle将在此元素中新建一个canvas元素。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												"open-sea-game"
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="gameKey">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{String}</span>
									
									<b>gameKey</b>							
								</div>
								
								<div class="description">
									游戏标识。用于游戏本地存储时区分不同游戏。原则上，一个游戏对应一个固定的游戏标识。取值为任意字符串。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												"default"
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="height">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Number}</span>
									
									<b>height</b>							
								</div>
								
								<div class="description">
									游戏画布高度。单位为像素。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												500
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="keyDelay">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Number}</span>
									
									<b>keyDelay</b>							
								</div>
								
								<div class="description">
									键盘按键延时。当玩家按住某个键不动时，将以此时间为间隔周期地触发按键事件。单位为毫秒。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												500
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="mustLoad">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Array}</span>
									
									<b>mustLoad</b>							
								</div>
								
								<div class="description">
									游戏全局资源，即需要被优先加载的资源。格式参考默认值。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												[{id:"key-config",type:"keys"},{id:"initial-team",type:"team"}]
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="resource">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{String}</span>
									
									<b>resource</b>							
								</div>
								
								<div class="description">
									游戏的资源文件路径。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												"../resource/resource.xml"
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="resourceType">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{String}</span>
									
									<b>resourceType</b>							
								</div>
								
								<div class="description">
									游戏资源的类型，可选为“xml”与“json”。当选择“xml”时，则要求资源返回数据必须是纯XML文本，当选择“json”时，则要求资源返回数据必须是{status:...,info:...,data:...}结构的JSON字符串。其中status可选0,1来表示请求是否成功。info值为若请求失败时失败的信息。data值为请求的XML文本。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												"xml"
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="squareheight">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Number}</span>
									
									<b>squareheight</b>							
								</div>
								
								<div class="description">
									游戏单元格高度。单位为像素。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												32
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="squarewidth">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Number}</span>
									
									<b>squarewidth</b>							
								</div>
								
								<div class="description">
									游戏单元格宽度。单位为像素。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												32
											</dd>
										
									</dl>
								
								
								<div class="hr"></div>
							
								<div class="fixedFont heading" id="width">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Number}</span>
									
									<b>width</b>							
								</div>
								
								<div class="description">
									游戏画布宽度。单位为像素。
									
									
									
								</div>
								
								
									
									<dl class="detailList nomargin">
									
										
										
											<dt class="heading">Since:</dt>
											<dd>0</dd>
										
										
										
											<dt class="heading">Default Value:</dt>
											<dd>
												600
											</dd>
										
									</dl>
								
								
								
							
						</div>
					</div>
				</section>
			
	<!--
	#### METHOD DETAILS
	-->		
			
				<section>
					<div class="details props">
						<div class="innerProps">
							<h2 class="sectionTitle">
								Method Detail
							</h2>
							
							<ul class="methodDetail" id="MethodDetail">
								
								
									<li 
										 class='item0'
									>
										<div class="fixedFont heading" id="combine">
											<span class='lighter'>
											
											</span>
											
											
											
											<b>combine</b>(config)
										</div>
										
										<div class="description">
											将另一个配置对象并入当前实例。
											
											
											
											
										</div>
										
										
										
										
											<dl class="detailList params">
												<dt class="heading">Parameters:</dt>
												
													<dt>
														<span class="light fixedFont">{Name.Sivory.Castle.Config}</span> <b>config</b>
														
													</dt>
													<dd></dd>
												
											</dl>
										
										
										
											<dl class="detailList nomargin">
											
												
												
												
													<dt class="heading">Since:</dt>
													<dd>0</dd>
												
												
												
												
												
												
												
												
												
											
											</dl>
										
										
									</li>
								
							</ul>
						</div>
					</div>
				</section>
			
			
	<!--
	#### EVENT DETAILS
	-->		
			
		</article>
	</div>
</div>

		<script type="text/javascript">
			wbos.CssTools.MediaQueryFallBack.LoadCss('../css/screen.css', '../css/handheld.css', 660)
			codeview.classFilter.Init()
		</script>
	</body>
</html>

